<nz-card>
  <div class="d-flex flex-row-reverse">
    <div class="d-flex">
      <button class="btn btn-primary mx-1" [routerLink]="['edit',''+key?.supplierKeyId]" [queryParams]="{returnUrl: admin_routes.keys.join('/')}">
        编辑
      </button>
      <button class="btn btn-warning mx-1"
              nz-popconfirm
              nzPopconfirmTitle="确定要删除这个账户?此操作不可逆！"
              nzPopconfirmPlacement="bottom"
              (nzOnConfirm)="delete(key!.supplierKeyId!)">
        删除
      </button>
    </div>
  </div>
  <div>
    密钥ID:{{key?.supplierKeyId}}
  </div>
  <div>
    端点基址:{{key?.baseUrl}}
  </div>
  <div>
    密钥:{{key?.apiKey}}
  </div>
  <div>
    <table class="table table-sm table-striped table-bordered">
      <thead>
        <th>模型&价格 ID</th>
        <th>模型名</th>
        <th>模型相对价格</th>
      </thead>
      <tbody>
      @if(key!==undefined&&(key!.modelFees!==undefined&&key!.modelFees!.length!==0)){
        @for(modelFee of key!.modelFees; track modelFee!.modelFeeId){
          <tr>
            <th>{{modelFee.modelFeeId}}</th>
            <th>{{modelFee.model?.name}}</th>
            <th>{{modelFee.fee}}</th>
          </tr>
        }
      }@else{
        <div>这里什么都没有哦</div>
      }
      </tbody>
    </table>
  </div>
</nz-card>
